<template>
  <div>


    <div class="top">
    <page-Title>猫眼电影</page-Title>
   
    <div > 
      <img src="" alt=""></div>

    <ul v-if="showMainType==='film'" class="topNav">
      <li :class="[showHot == 0? 'active':'']" @click="showHot=0">热映</li>
      <li :class="[showHot == 1? 'active':'']" @click="showHot=1">影院</li>
      <li :class="[showHot == 2? 'active':'']" @click="showHot=2">待映</li>
      <li :class="[showHot == 3? 'active':'']" @click="showHot=3">经典电影</li>
    </ul>
  </div>

  <div class="main">
    <div v-if=" showMainType === 'film' "> 
      <hoting v-show="showHot==0"></hoting>
      <cinema v-show="showHot==1"></cinema>
      <comming v-show="showHot==2"></comming>
    </div>

    <div v-else-if="showMainType === 'mine'">
      <mine></mine>
    </div>

    <div v-else>
      <smallvideo></smallvideo>
    </div>
    
    <div class="footer-nav">
      <page-footer @chooseMenu = "chooseMenu"></page-footer>
      </div>  
      
      
  </div>

  
  </div>
</template>

<script>
import hoting from '@/components/index/hoting'
import comming from '@/components/index/comming'
import Cinema from '../components/index/cinema.vue'
import PageFooter from '../components/pageFooter.vue'
import Mine from '../components/mine.vue'
import Smallvideo from '../components/smallvideo.vue'


export default {
  name: 'index',
  props:{
    msg:String
  },
  components:{
    hoting,comming,Cinema,
    PageFooter,
    Mine,
    Smallvideo,
  },
  data(){

    return{

      showHot:0,
      showMainType: 'film',
    };
  },
  methods:{
    chooseMenu(val) {
      this.showMainType = val;
    }
  }
};
</script>

<style scoped>
.top{
  width: 100%;
  position: fixed;
  z-index: 9;
}
.topNav{
  height: 44px;
  line-height: 44px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  border-bottom: 1px solid #ccc;
  background-color: #fff;
  list-style-type: none;
}
.topNav li{
  height: 100%;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
}
.active{
  color: rgb(229, 72, 71);
  border-bottom: 2px solid rgb(229, 72, 71);
}
.main{
  padding-top: 134px;
  
  overflow-x: hidden;
}
.footer-nav {
  position: fixed;
  bottom: 0;
  height: 50px;
  width: 100%;
  padding: 8px 50px 0px 0px;
  background-color: #fff;
  border-top: 1px solid #dbdbdb;
}



</style>
